Paragraph TAG IN HTML

In HTML, the <p> tag is used to define a paragraph. It's a structural element that indicates a block of text or content that forms a distinct unit within a document. When you enclose text within <p> tags, web browsers typically render it with some default margin and spacing, separating it from surrounding content.
Basic Syntax of Paragraph tag:


<!DOCTYPE html> <html> <head> <title></title> </head> <body> <p>This is a paragraph of text.</p> </body> </html>

Output :

This is a paragraph of text.

  • Example of Paragraph tag :
  • Example-1

    <!DOCTYPE html> <html> <head> <title></title> </head> <body> <p>PBA INSTITUTE is an advanced coaching institute.</p> </body> </html>

    Output :

    PBA INSTITUTE is an advanced coaching institute.

    Example-2

    #text align center.. <!DOCTYPE html> <html> <body style="text-align:center"> <p>This is a paragraph.</p> <p>This is also paragraph.</p> </body> </html>

    Output :

    This is a paragraph.

    This is also paragraph.

    Example-3

    #text align right.. <!DOCTYPE html> <html> <body style="text-align:right;"> <p>This is a paragraph.</p> <p>This is also paragraph.</p> </body> </html>

    Output :

    This is a paragraph.

    This is also paragraph.

    Example-4

    #text align left.. <!DOCTYPE html> <html> <body style="text-align:left"> <p>This is a paragraph.</p> <p>This is also paragraph.</p> </body> </html>

    Output :

    This is a paragraph.

    This is also paragraph.

  • Conclusion :
  • In HTML, the <p> tag denotes a paragraph, allowing for structured presentation of textual content. Unlike many other tags, it doesn't necessitate a closing tag (</p>). The absence of a closure is because browsers inherently understand the paragraph's termination upon encountering the next block-level element. This succinctly organizes content, enhancing readability and semantic clarity within web pages.